using System;
using System.Collections.Generic;
using System.Text;

namespace Dominio
{
    public class User
    {
        protected int id;
        protected String name;
        protected String lastName;
        protected String country;
        protected DateTime born;
        protected String address;
        protected String city;
        protected String email;
        protected DateTime lastLogOn;
        protected String password;
        protected int dni;
        protected Role role;
        protected IList<Patente> patentes;
        protected IList<Familia> familias;
        
        // Empty constructor used by Hibernate
        protected User() { }

        public User(String name, String lastName, String email, String address, String country, String city, String password, int dni)
        {
            this.dni = dni;
            this.name = name;
            this.lastName = lastName;
            this.address = address;
            this.lastLogOn = new DateTime();
            this.email = email;
            this.country = country;
            this.email = email;
            this.city = city;
            this.password = password;
        }

        public User(int id, String name, String lastName, String email, String address, String country, String city, String password, int dni)
        {
            this.Id = id;
            this.dni = dni;
            this.name = name;
            this.lastName = lastName;
            this.address = address;
            this.lastLogOn = new DateTime();
            this.email = email;
            this.country = country;
            this.email = email;
            this.city = city;
            this.password = password;
        }

        #region Getters and setters
        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }
        public virtual IList<Familia> Familias
        {
            get { return familias; }
            set { familias = value; }
        }
        public virtual IList<Patente> Patentes
        {
            get { return patentes; }
            set { patentes = value; }
        }
        public virtual int Dni
        {
            get { return dni; }
            set { dni = value; }
        }
        public virtual String Password
        {
            get { return password; }
            set { password = value; }
        }

        public virtual String LastName
        {
            get { return lastName; }
            set { lastName = value; }
        }

        public virtual DateTime Born
        {
            get { return born; }
            set { born = value; }
        }

        public virtual Role Role
        {
            get { return role; }
            set { role = value; }
        }

        public virtual String Address
        {
            get { return address; }
            set { address = value; }
        }

        public virtual String City
        {
            get { return city; }
            set { city = value; }
        }

        public virtual String Country
        {
            get { return country; }
            set { country = value; }
        }

        public virtual String Name
        {
            get { return name; }
            set { name = value; }
        }

        public virtual DateTime LastLogOn
        {
            get { return lastLogOn; }
            set { lastLogOn = value; }
        }

        public virtual String Email
        {
            get { return email; }
            set { email = value; }
        }
        #endregion



    }
}
